<link rel="stylesheet" type="text/css" href="{:CSS}datetimepicker.min.css">
<div class="row"><h3 class="page-header">赛事信息管理</h3></div>
<div class="row">
    <div class="panel panel-default">
        <div class="panel-body">
        	<label><a class="btn btn-primary" href="{:U('Ssnews/add')}">添加</a></label>
            <form action='{:U("Ssnews/index")}' class="form-inline text-right m-b-5 fr">
                标题：<input type="text" name='title' value='{$Think.get.title}' class="form-control">
                时间：<input class="form-control datepick required" name="start_time" value="{$Think.get.start_time}" size="10" placeholder="起始时间" readonly>
                <input class="form-control datepick required" name="end_time" value="{$Think.get.end_time}" size="10" placeholder="终止时间" readonly>
                状态：<select name='status_query' class="form-control">
                    <option value='-1'>全部</option>
                    <option value='1' <eq name='Think.get.status_query' value='1'>selected</eq> >启用</option>
                    <option value='0' <eq name='Think.get.status_query' value='0'>selected</eq> >禁用</option>
                </select>
                <button class="btn btn-primary" type="submit">搜索</button>
            </form>
            <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                        <tr>
                            <th width="60">序号</th>
                            <th>栏目</th>
                            <th>标题</th>
                            <th>添加时间</th>
                            <th>浏览数</th>
                            <th>排序</th>
                            <th>状态</th>
                            <th width="170">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                     <empty name="list">
                            <tr><td colspan="8" align="center">暂无信息</td></tr>
                        </empty>
                        <volist name="list" id="list">
                            <tr>
                                <td>{$i}</td>
                                <td>{$list.name}</td>
                                <td>{$list.title}</td>
                                <td>{$list.times|date='Y-m-d H:i', ###}</td>
                                <td>{$list.view}</td>
                                <td><input class="setSort" type="text" size="2" data-url="{:U('News/setSort?id='.$list['id'])}" value="{$list.sort}"></td>
                                <td><button class='btn <eq name="list.status" value="1">btn-primary<else />btn-default</eq> btn-sm setStatus' type="button" data-url='{:U("News/setStatus?id=".$list["id"])}' data-status="{$list.status}"><eq name="list.status" value='1'>启用<else />禁用</eq></button></td>
                                <td>
                                    <a class="btn-sm btn btn-default" href='{:U("Ssnews/edit?id=".$list["id"])}'>修改</a>
                                    <button data-url='{:U("Ssnews/del?id=".$list["id"])}' class="btn-sm btn btn-default delBtn" type="button">删除</button>
                                </td>
                            </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
            {$page}
        </div>
    </div>
</div>
<script type="text/javascript" src="{:JS}daterangepicker.min.js"></script>
<script type="text/javascript">
$(".datepick").datetimepicker({format : "yyyy-mm-dd", minView : 2, autoclose : true});
</script>